home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / musictex / older-versions / musictex.502 / MUSICG16.MF < prev    next >
Text File  |  1992-06-03  |  43KB  |  1,361 lines

  1. apog_fact=0.75;
  2. apog_nhh=apog_fact*nhh;
  3. apog_nhh#=apog_fact*nhh#;
  4. %
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. %       NOTENKOEPFE UND FAEHNCHEN                             %
  7. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  8. %
  9. %%%%%%%%%%%%%%%
  10. %%notenkoepfe %
  11. %%%%%%%%%%%%%%%
  12.  
  13. def drawnoteb(expr noteheadwidth, noteheadheight, theta_a, theta_b, theta_c,
  14. width_a, width_b)  =
  15.                                             %         .l
  16.             penpos1(width_a, theta_a);      %         .2
  17.                                             %         .r
  18.             penpos3(width_a, 180+theta_a);  %.l.1.r            .r.3.l
  19.                                             %         .r
  20.             penpos2(width_b, 180+theta_b);  %         .4
  21.                                             %         .l
  22.             penpos4(width_b, theta_b);    %
  23.             y1 = y3 = 0;
  24.             x2 = x4 = 1/2noteheadwidth;
  25.             x1l= 0; x3l = noteheadwidth; y2l = noteheadheight; y4l = -noteheadheight;
  26.             penstroke (z1e{up}..z2e{right}..z3e{down}..z4e{left}..cycle)
  27.             rotatedaround((origin +1/2noteheadwidth*right),theta_c);
  28.             enddef;
  29. %%%%%%%%%%%%%%%
  30. %    flags    %
  31. %%%%%%%%%%%%%%%
  32. %
  33. %
  34. pickup pencircle scaled (0.1pt);
  35. def penstrike text t =
  36.  forsuffixes e = l,r: path_.e:=t; endfor
  37.  if cycle path_.l: cyclestroke_
  38.  else: filldraw path_.l -- reverse path_.r -- cycle fi enddef;
  39. def flagshape(suffix i) (expr width, height, thicka, thin, shiftx, shifty) =
  40.            pair intersectionp;                             %
  41.            thick := 1/3 height;
  42.            sh[-3] = (shiftx, 0);
  43.            sh[i] = (shiftx, shifty);                                  %  .1
  44.            penpos[i](thick,90);                            %
  45.            penpos[i+1](  3thin ,90);                       %       .2
  46.            penpos[i+2](thin,0);                            %
  47.            penpos[i+3](thin,0);                            %           .3
  48.            x[i] =  -1/16mm;                                %
  49.            y[i]r =  height;                                %        .4
  50.            x[i+1] = 3/8width;                              %
  51.            y[i+1] = height - thick;                        %
  52.            y[i+3] = 0;
  53.            x[i+2]r  = x[i+3]+2s= width;
  54.            y[i+2]r = height - 2thick;
  55.            if i>1: intersectionp  = z[i-2];
  56.            else   : intersectionp = z[i+3];
  57.            fi;
  58.            penstrike (z[i]e{dir(angle(z[i+1]e-z[i]e)-15)}
  59.            ..z[i+1]e{z[i+1]e-z[i]e}
  60.            ..z[i+2]e{down}..intersectionp shifted (sh[i-4]-sh[i]))
  61.            shifted sh[i];
  62.            for n=0 upto 3:
  63.            k:=i+n;
  64.            penlabels(k);endfor;
  65.            enddef;
  66.  
  67. def flagshaper(suffix i) (expr width, height, thicka, thin, shift) =
  68.            pair intersectionp;                             %
  69.            thick := 1/3 height;
  70.            sh[-3] := origin+shift;
  71.            sh[i] = shift;                                  %  .1
  72.            penpos[i](thick,90);                            %
  73.            penpos[i+1](  3thin ,90);                       %       .2
  74.            penpos[i+2](thin,0);                            %
  75.            penpos[i+3](thin,0);                            %           .3
  76.            x[i] =  0;                                      %
  77.            y[i]r =  height;                                %        .4
  78.            x[i+1] = 3/8width;                              %
  79.            y[i+1] = height - thick;                        %
  80.            y[i+3] = 0;
  81.            x[i+2]r  = x[i+3]+2s= width;
  82.            y[i+2]r = height - 2thick;
  83.            if i>1: intersectionp  = z[i-2];
  84.            else   : intersectionp = z[i+3];
  85.            fi;
  86.            penstrike (counterclockwise
  87.            (z[i]e{dir(angle(z[i+1]e-z[i]e)-15)}
  88.            ..z[i+1]e{z[i+1]e-z[i]e}
  89.            ..z[i+2]e{down}..intersectionp shifted (-sh[i-4]+sh[i]))
  90.            reflectedabout (z1r scaled 0.5,
  91.              z1r scaled 0.5+right) )
  92.            shifted sh[i];
  93.            enddef;
  94.  
  95. %%%%%%%%%%%%%%%%%%%%%%
  96. % song system limits %
  97. %%%%%%%%%%%%%%%%%%%%%%
  98. beginchar(126,nhw#,nhh#,0);
  99.      clear;
  100.      z1=(-0.5nhw,-0.2pt);
  101.      z2=(0,-0.2pt);
  102.      z3=(0.7nhw,0.5nhh);
  103.      penpos1(0.4pt,90);
  104.      penpos2(0.4pt,90);
  105.      penpos3(0.1pt,135);
  106.      penstroke (z1e--z2e..z3e);
  107. endchar;
  108. beginchar(127,nhw#,-nhh#,0);
  109.      clear;
  110.      z1=(-0.5nhw,0.2pt);
  111.      z2=(0,0.2pt);
  112.      z3=(0.7nhw,-0.5nhh);
  113.      penpos1(0.4pt,90);
  114.      penpos2(0.4pt,90);
  115.      penpos3(0.1pt,135);
  116.      penstroke (z1e--z2e..z3e);
  117. endchar;
  118.  
  119. %%%%%%%%%%%%%%%%
  120. % 4 crescendos %
  121. %%%%%%%%%%%%%%%%
  122. for n:=1 upto 4:
  123.   beginchar(15+n, 4*n*nhw#, (0.5+0.1*n)*nhh#, (0.5+0.1*n)*nhh#);
  124.     pickup pencircle scaled (0.4s);
  125.     draw   (0,(0.5+0.1*n)*nhh)--(4*n*nhw,0)--(0,-(0.5+0.1*n)*nhh);
  126.   endchar;
  127. endfor;
  128. %%%%%%%%%%%%%%%%%%
  129. % 4 decrescendos %
  130. %%%%%%%%%%%%%%%%%%
  131. for n:=1 upto 4:
  132.   beginchar(19+n, 4*n*nhw#, (0.5+0.1*n)*nhh#, (0.5+0.1*n)*nhh#);
  133.     pickup pencircle scaled (0.4s);
  134.     draw   (4*n*nhw,(0.5+0.1*n)*nhh)--(0,0)--(4*n*nhw,-(0.5+0.1*n)*nhh);
  135.   endchar;
  136. endfor;
  137. %%%%%%%%%%%%%%%
  138. %   accents   %
  139. %%%%%%%%%%%%%%%
  140. % point au-dessus de la note
  141. beginchar(24, nhw#, 1.0nhh#, 0.0nhh#);
  142.   clear;
  143.   pickup pencircle scaled 0.25nhh;
  144.   drawdot (0.5nhw, nhh);
  145. endchar;
  146. % point au-dessous de la note
  147. beginchar(25, nhw#, 0.0nhh#, 1.0nhh#);
  148.   clear;
  149.   pickup pencircle scaled 0.25nhh;
  150.   drawdot (0.5nhw, -nhh);
  151. endchar;
  152. % barre au-dessus de la note
  153. beginchar(26, nhw#, 1.0nhh#, 0.0nhh#);
  154.   clear;
  155.   pickup penrazor scaled 0.15nhh rotated 90;
  156.   draw (0.0nhw, nhh)--(1.0nhw, nhh);
  157. endchar;
  158. % trait au-dessous de la note
  159. beginchar(27, nhw#, 0.0nhh#, 1.0nhh#);
  160.   clear;
  161.   pickup penrazor scaled 0.15nhh rotated 90;
  162.   draw (0.0nhw, -nhh)--(1.0nhw, -nhh);
  163. endchar;
  164. % accent (pizz.) au-dessus de la note
  165. beginchar(28, nhw#, 1.0nhh#, 0.0nhh#);
  166.   clear;
  167.   dely:=1.2nhh;
  168.   rayon:=0.2nhh;
  169.   z1=(0.5nhw,dely+rayon);
  170.   z2=(0.5nhw-rayon,dely);
  171.   z3=(0.5nhw,dely-0.45nhh);
  172.   z4=(0.5nhw+rayon,dely);
  173.   fill z1{left}..{down}z2--z3--z4{up}..{left}cycle;
  174. endchar;
  175. % accent (pizz.) au-dessous de la note
  176. beginchar(29, nhw#, 0.0nhh#, 1.0nhh#);
  177.   clear;
  178.   rayon:=0.2nhh;
  179.   z1=(0.5nhw,nhh+rayon);
  180.   z2=(0.5nhw-rayon,nhh);
  181.   z3=(0.5nhw,0.55nhh);
  182.   z4=(0.5nhw+rayon,nhh);
  183.   fill (z1{left}..{down}z2--z3--z4{up}..{left}cycle) rotatedaround ((0.5nhw,0),180);
  184. endchar;
  185. % accent (sforz.) au-dessus de la note
  186. beginchar(30, nhw#, 1.5nhh#, 0.0nhh#);
  187.   clear;
  188.   z1=(1.2nhw,1.3nhh);
  189.   z2=(-0.2nhw,1.3nhh);
  190.   pickup pencircle scaled 0.5s;
  191.   draw z1--(x2,y2+0.3nhh);
  192.   draw z1--(x2,y2-0.3nhh);
  193. endchar;
  194. % accent (sforz.) au-dessous de la note
  195. beginchar(31, nhw#, 0.0nhh#, 1.0nhh#);
  196.   clear;
  197.   z1=(1.2nhw,-1.3nhh);
  198.   z2=(-0.2nhw,-1.3nhh);
  199.   pickup pencircle scaled 0.5s;
  200.   draw z1--(x2,y2+0.3nhh);
  201.   draw z1--(x2,y2-0.3nhh);
  202. endchar;
  203. %%%%%%%%%%%%%%%
  204. %   breve     %
  205. %%%%%%%%%%%%%%%
  206. beginchar(32, nhw#, 0.7nhh#, 0.7nhh#);
  207.   clear;
  208.   pickup pencircle scaled (4thinwidth);
  209.   draw (0,h)--(0,-d);
  210.   draw (w,h)--(w,-d);
  211.   fill (0,0.75h)--(w,0.75h)--(w,0.25h)--(0,0.25h)--cycle;
  212.   fill (0,-0.75d)--(w,-0.75d)--(w,-0.25d)--(0,-0.25d)--cycle;
  213. endchar;
  214. %%%%%%%%%%%%%%%
  215. %% volle Note %
  216. %%%%%%%%%%%%%%%
  217. beginchar(33, nhw#, .5nhh#, .5nhh#);
  218.           w:=w+2thinwidth;
  219.           drawnoteb(w, h, 0, 90, 20, w/2, nhh/2);
  220. endchar;
  221. %%%%%%%%%%%%%%%
  222. %% halbe Note %
  223. %%%%%%%%%%%%%%%
  224. beginchar(34, nhw#, .5nhh#, .5nhh#);
  225.           w:=w+2thinwidth;
  226. %         drawnoteb(w, h, 0, 90, 20, thinwidth, nhh/4);
  227.           drawnoteb(w, h, 0, 90, 20, 3*thinwidth, nhh/4);
  228. endchar;
  229. %%%%%%%%%%%%%%%
  230. %% ganze Note %
  231. %%%%%%%%%%%%%%%
  232. beginchar(35,1.5nhh#, .5nhh#, .5nhh#);
  233. %         drawnoteb(w, h, 0, 85, 0, nhh/3, thinwidth);
  234.           drawnoteb(w, h, 0, 85, 0, nhh/3, 3*thinwidth);
  235. endchar;
  236. %%%%%%%%%%%%%%%
  237. % semi-breve  %
  238. %%%%%%%%%%%%%%%
  239. beginchar(36, 2nhw#, 0.7nhh#, 0.7nhh#);
  240.   clear;
  241.   pickup pencircle scaled (4thinwidth);
  242.   draw (0,h)--(0,-d);
  243.   draw (w,h)--(w,-d);
  244.   fill (0,0.75h)--(w,0.75h)--(w,0.25h)--(0,0.25h)--cycle;
  245.   fill (0,-0.75d)--(w,-0.75d)--(w,-0.25d)--(0,-0.25d)--cycle;
  246. endchar;
  247. %%%%%%%%%%%%%%%
  248. %% volle kleine Note %
  249. %%%%%%%%%%%%%%%
  250. beginchar(37, apog_fact*nhw#, .50*apog_nhh#, .50*apog_nhh#);
  251.           w:=apog_fact*nhw;
  252.           w:=w+2thinwidth;
  253.           drawnoteb(w, h, 0, 90, 20, w/2, apog_nhh/2);
  254. endchar;
  255. %%%%%%%%%%%%%%%
  256. %% halbe Note %
  257. %%%%%%%%%%%%%%%
  258. beginchar(38, apog_fact*nhw#, apog_fact*0.5nhh#, apog_fact*0.5nhh#);
  259.           w:=w+2thinwidth;
  260. %         drawnoteb(w, h, 0, 90, 20, thinwidth, nhh/4);
  261.           drawnoteb(w, h, 0, 90, 20, 3*thinwidth, apog_nhh/4);
  262. endchar;
  263. %%%%%%%%%%%%%%%
  264. %% ganze Note %
  265. %%%%%%%%%%%%%%%
  266. beginchar(39, 1.5*apog_nhh#, apog_fact*0.5nhh#, apog_fact*0.5nhh#);
  267. %         drawnoteb(w, h, 0, 85, 0, nhh/3, thinwidth);
  268.           drawnoteb(w, h, 0, 85, 0, apog_nhh/3, 3*thinwidth);
  269. endchar;
  270. %%%%%%%%%%%%%%%%%%%%%%%
  271. %% "8flag nach unten" %
  272. %%%%%%%%%%%%%%%%%%%%%%%
  273. beginchar(40, 0, 3nhh#, 0);
  274.           clear;
  275.           w:=0.8*nhw;
  276.           pickup pencircle scaled (0.1pt);
  277.           flagshape(1,w, h, nhh, 5thinwidth, 0, 0);
  278.           w:=0;
  279. endchar;
  280. %%%%%%%%%%%%%%%%%%%%%%%%
  281. %% "16flag nach unten" %
  282. %%%%%%%%%%%%%%%%%%%%%%%%
  283. beginchar(41, 0, 3.25nhh#, 0);
  284.           clear;
  285.           w:=0.8*nhw;
  286.           pickup pencircle scaled (0.1pt);
  287.           flagshape(1, w, 2.5nhh, 2/3nhh, 5thinwidth, 0, 0);
  288.           flagshape(5,.95 w, 2.25 nhh, 2/3nhh, 5thinwidth, 0, nhh);
  289.           w:=0;
  290. endchar;
  291. %%%%%%%%%%%%%%%%%%%%%%%%
  292. %% "32flag nach unten" %
  293. %%%%%%%%%%%%%%%%%%%%%%%%
  294. beginchar(42, 0, 3.75  nhh#, 0);
  295.           clear;
  296.           w:=0.8*nhw;
  297.           pickup pencircle scaled (0.1pt);
  298.           flagshape(1, w, 2.5nhh, 2/3nhh, 5thinwidth, 0, 0);
  299.           flagshape(5, .95w, 2.25 nhh, 2/3nhh, 5thinwidth, 0, nhh);
  300.           flagshape(9, .9w, 2   nhh, 2/3nhh, 5thinwidth, 0, 1.75nhh);
  301.           w:=0;
  302. endchar;
  303. %%%%%%%%%%%%%%%%%%%%%%%%
  304. %% "64flag nach unten" %
  305. %%%%%%%%%%%%%%%%%%%%%%%%
  306. beginchar(43, 0, 4.25nhh#, 0);
  307.           clear;
  308.           w:=0.8*nhw;
  309.           pickup pencircle scaled (0.1pt);
  310.           flagshape(1, w, 2.5nhh, 2/3nhh, 5thinwidth, 0, 0);
  311.           flagshape(5,.95 w, 2.25 nhh, 2/3nhh, 5thinwidth, 0, nhh);
  312.           flagshape(9,.9w, 2  nhh, 2/3nhh, 5thinwidth, 0, 1.75nhh);
  313.           flagshape(13,0.85w, 2nhh, 2/3nhh, 5thinwidth, 0, 2.25nhh);
  314.           w:=0;
  315. endchar;
  316. %%%%%%%%%%%%%%%%%%%%%%%%%
  317. %% "128flag nach unten" %
  318. %%%%%%%%%%%%%%%%%%%%%%%%%
  319. beginchar(44, 0, 4.5nhh#, 0);
  320.           clear;
  321.           w:=0.8*nhw;
  322.           pickup pencircle scaled (0.1pt);
  323.           flagshape(1, w, 2.5nhh, 2/3nhh, 5thinwidth, 0, 0);
  324.           flagshape(5, w, 2.25nhh, 2/3nhh, 5thinwidth, 0, nhh);
  325.           flagshape(9, w, 2 nhh, 2/3nhh, 5thinwidth, 0, 1.75nhh);
  326.           flagshape(13,0.9 w, 2nhh, 2/3nhh, 5thinwidth, 0, 2.25nhh);
  327.           flagshape(17,0.9 w, 1.5nhh, 1/3nhh, 5thinwidth, 0, 3nhh);
  328.           w:=0;
  329. endchar;
  330. %%%%%%%%%%%%%%%%%%%%%%
  331. %% "8flag nach oben" %
  332. %%%%%%%%%%%%%%%%%%%%%%
  333. beginchar(45, 0, 3nhh#, 0);
  334.          clear;
  335.          w:=0.8*nhw;
  336.          pickup pencircle scaled (0.1pt);
  337.          flagshaper(1,w, h, nhh, 5thinwidth, origin);
  338.          penlabels(1,2,3,4);
  339.          w:=0;
  340. endchar;
  341. %%%%%%%%%%%%%%%%%%%%%%%
  342. %% "16flag nach oben" %
  343. %%%%%%%%%%%%%%%%%%%%%%%
  344. beginchar(46, 0, 3.25nhh#, 0);
  345.           clear;
  346.           w:=0.8*nhw;
  347.           pickup pencircle scaled (0.1pt);
  348.           flagshaper(1, w, 2.5nhh, 2/3nhh, 5thinwidth, (0,0.75nhh));
  349.           flagshaper(5, w, 2.25 nhh, 2/3nhh, 5thinwidth,(0,-0.25nhh));
  350.          penlabels(1,2,3,4,5,6,7,8);
  351.           w:=0;
  352. endchar;
  353. %%%%%%%%%%%%%%%%%%%%%%%
  354. %% "32flag nach oben" %
  355. %%%%%%%%%%%%%%%%%%%%%%%
  356. beginchar(47, 0, 3.75  nhh#, 0);
  357.           clear;
  358.          w:=0.8*nhw;
  359.           pickup pencircle scaled (0.1pt);
  360.           flagshaper(1, w, 2.5nhh, 2/3nhh, 5thinwidth, (0,1.5nhh));
  361.           flagshaper(5, w, 2.5nhh, 2/3nhh, 5thinwidth, (0,0.75nhh));
  362.           flagshaper(9, .95w, 2.25 nhh, 2/3nhh, 5thinwidth, origin);
  363.          penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
  364.           w := 0;
  365. endchar;
  366. %%%%%%%%%%%%%%%%%%%%%%%
  367. %% "64flag nach oben" %
  368. %%%%%%%%%%%%%%%%%%%%%%%
  369. beginchar(48, 0, 4.25nhh#, 0);
  370.           clear;
  371.          w:=0.8*nhw;
  372.           pickup pencircle scaled (0.1pt);
  373.           flagshaper(1, w, 2.5nhh, 2/3nhh, 5thinwidth, (0,1.75nhh));
  374.           flagshaper(5, w, 2.25 nhh, 2/3nhh, 5thinwidth, (0,1nhh));
  375.           flagshaper(9,w, 2  nhh, 2/3nhh, 5thinwidth, (0,0.34nhh));
  376.           flagshaper(13,0.9w, 2nhh, 2/3nhh, 5thinwidth, (0,-0.32nhh));
  377.          penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
  378.           w := 0;
  379. endchar;
  380. %%%%%%%%%%%%%%%%%%%%%%%%
  381. %% "128flag nach oben" %
  382. %%%%%%%%%%%%%%%%%%%%%%%%
  383. beginchar(49, 0, 4.5nhh#, 0);
  384.           clear;
  385.          w:=0.8*nhw;
  386.           flagshaper(1, w, 2.25nhh, 2/3nhh, 5thinwidth, (0,2.5nhh));
  387.           flagshaper(5, w, 2.25nhh, 2/3nhh, 5thinwidth, (0,1.75nhh));
  388.           flagshaper(9, w, 2 nhh, 2/3nhh, 5thinwidth, (0,1nhh));
  389.           flagshaper(13,0.9 w, 2nhh, 2/3nhh, 5thinwidth, (0,0.5nhh));
  390.           flagshaper(17,0.9 w, 2nhh, 1/3nhh, 5thinwidth, (0,0nhh));
  391.           w := 0;
  392. endchar;
  393. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  394. %                                                            %
  395. %                VERSETZUNGSZEICHEN                          %
  396. %                                                            %
  397. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  398. %%%%%%%%%%%%
  399. %% "flat"  %
  400. %%%%%%%%%%%%
  401. def flat (expr reduction) =
  402.          clear; flatraise:=-0.1*nhh*reduction;
  403.          penpos4(7/24reduction*nhh, 25);%/5,20           %  1
  404.          penpos3(reduction*nhh/6,-90);%/5,20             %
  405.          penpos6(reduction*nhh/6,-90);%/5,20             %
  406.          penpos2(reduction*nhh/5, 90);%/5,20             %
  407.          y1 =  h;                                        %      4
  408.          x1 = x2 = x3 = reduction*s; x4 = reduction*(nhw-s); %  2
  409.          y4 = reduction*s;                               %
  410.          y2l - y3r =  1/4h; y2l = 0;                     %  3
  411.          currentpen:= pencircle scaled 3thinwidth;
  412.          penstroke  (z2e...z4e...z3e{3left+2down}) shifted (0,flatraise);%right ,sw
  413.          draw (z1--z3) shifted (0,flatraise) ;
  414.          penlabels(1,2,3,4);
  415. enddef;
  416. %
  417. beginchar(50, nhw#, 2nhh#, 2nhh#);
  418.  flat (1.0);
  419. endchar;
  420. %
  421. %%%%%%%%%%
  422. %% "bb"  %
  423. %%%%%%%%%%
  424. beginchar(51,2nhw#, 2nhh#, 2nhh#);
  425.          flat (1.0); 
  426.          draw (z1--z3) shifted ((w/2 - 1.5s),flatraise);
  427.          penstroke (z2e..z4e...z3e{3left+2down})shifted ((w/2
  428.          -1.5s),flatraise);
  429. endchar;
  430. %%%%%%%%%%%%%
  431. %% "sharp"  %
  432. %%%%%%%%%%%%%
  433. def sharp ( expr reduction ) =
  434.          clear;
  435.          penpos3(3/8reduction*nhh,90);
  436.          penpos4(3/8reduction*nhh,90);
  437.          penpos5(3/8reduction*nhh,90);
  438.          penpos6(3/8reduction*nhh,90);
  439.          y1 + y2 = -0.5reduction*s; y1 - y2 = 2h - reduction*s;
  440.          x1 = x2 =  reduction*s; y3 = 1/4reduction*nhh;
  441.          y4l = y3r; x3= 0; x4 = 0.8*reduction*nhw;
  442.          y5 = -y4; y6 = -y3; x5 = x3; x6 = x4;
  443.          currentpen:=  pencircle scaled 3thinwidth;
  444.          draw z1--z2;
  445.          draw (z1--z2) shifted (w-2reduction*s,reduction*s);
  446.          penstroke  z3e--z4e;
  447.          penstroke (z5e--z6e) ;
  448.          penlabels(1,2,3,4,5,6);
  449. enddef;
  450. %
  451. beginchar(52, 0.8nhw#, 1.5nhh#, 1.5nhh#);
  452.   sharp(1.0);
  453. endchar;
  454. %
  455. %%%%%%%%%%
  456. %% "xx"  %
  457. %%%%%%%%%%%
  458. beginchar(53, nhw#, .5nhw#, .5nhw#);
  459.          clear;
  460.          z1 = (0.150w, h-0.150w); z2 = (w-0.150w, h-0.150w);
  461.          z3 = (0.150w,-h+0.150w); z4 = (w-0.150w,-h+0.150w);
  462.          currentpen:= pencircle scaled .2nhh;
  463.          draw z1--z4; draw z3--z2;
  464.          currentpen:= pensquare scaled .30w;
  465.          drawdot z1; drawdot z2; drawdot z3; drawdot z4;
  466. endchar;
  467. %%%%%%%%%%%%%%%
  468. % "natural"  %
  469. %%%%%%%%%%%%%%%
  470. def natural =
  471.          clear;
  472.          reduction:=w/(0.8*nhw);
  473.          penpos3(3/8reduction*nhh,90);
  474.          penpos4(3/8reduction*nhh,90);
  475.          penpos7(3/8reduction*nhh,90);
  476.          penpos8(3/8reduction*nhh,90);
  477.          x1 = x2 = x3 = x7 = 0.75*reduction*s;
  478.          x5 = x6 = x4 = x8 = w-x1;
  479.          y1 =  h;  y3 =  0.30reduction*nhh ;
  480.          y4l = y3r-0.5*reduction*s ;
  481.          y6 = -y1; y5 = -y2;
  482.          y7l = y2;
  483.          y7 = -y4; y8 = -y3;
  484.          currentpen:= pencircle scaled 3thinwidth;
  485.          draw z1--z2;
  486.          draw z5--z6;
  487.          penstroke  z3e--z4e;
  488.          penstroke  z7e--z8e;
  489. enddef;
  490. %
  491. beginchar(54, 0.8nhw#, 1.5nhh#, 1.5nhh#);
  492.   natural;
  493. endchar;
  494. %
  495. %%%%%%%%%%%%%%%%
  496. %% "1/4 flat"  %
  497. %%%%%%%%%%%%%%%%
  498. beginchar(55, nhw#, 2nhh#, 2nhh#);
  499.          clear;
  500.          penpos4(7/24nhh, 25);%/5,20           %  1
  501.          penpos3(nhh/6,-90);%/5,20             %
  502.          penpos2(nhh/6, 90);%/5,20             %
  503.          y1 =  h;                              %         4
  504.          x1 = x2 = x3 = w-s; x4 =2w-3s;        %  2
  505.          y4 = s;                               %
  506.          y2l - y3r =  1/4h; y2l = 0;           %  3
  507.          currentpen:= pencircle scaled 3thinwidth;
  508.          penstroke  (counterclockwise
  509.          (z2e...z4e...z3e{3left+2down}) reflectedabout(z1 ,z3));
  510.          draw z1--z3;
  511.          penlabels(1,2,3,4);
  512. endchar;
  513. %%%%%%%%%%%%%%%%
  514. %% "3/4 flat"  %
  515. %%%%%%%%%%%%%%%%
  516. beginchar(56, 2nhw#, 2nhh#, 2nhh#);
  517.          clear;
  518.          penpos4(7/24nhh, 25);%/5,20           %  1
  519.          penpos3(nhh/6,-90);%/5,20             %
  520.          penpos2(nhh/6, 90);%/5,20             %
  521.          y1 =  h;                              %         4
  522.          x1 = x2 = x3 = w/2; x4 =x1+nhw-2s;    %  2
  523.          y4 = s;                               %
  524.          y2l - y3r =  1/4h; y2l = 0;           %  3
  525.          currentpen:= pencircle scaled 3thinwidth;
  526.          penstroke  z2e...z4e...z3e{3left+2down};
  527.          penstroke  (counterclockwise
  528.          (z2e...z4e...z3e{3left+2down}) reflectedabout(z1 ,z3));
  529.          draw z1--z3;
  530.          penlabels(1,2,3,4);
  531. endchar;
  532. %
  533. % Gregorian notes
  534. %
  535. beginchar(57, nhw#, .5nhh#, .5nhh#);
  536.   fill (0.5w-0.8h,0)--(0.5w,h)--(0.5w+0.8h,0)--(0.5w,-h)--cycle;
  537. endchar;
  538. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  539. %                                                             %
  540. %                      PAUSEN                                 %
  541. %                                                             %
  542. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  543. %%%%%%%%%
  544. %% "dp" %
  545. %%%%%%%%%
  546. beginchar(58,1/2nhw#, 3nhh#, 0);
  547.          clear;
  548.          penpos1(nhh,90);
  549.          penpos2(nhh,90);
  550.          y1r = y2r = h;
  551.          x1r =  0; x2r = w;
  552.          currentpen:= pencircle;
  553.          penstroke z1e--z2e;
  554. labels(1,2);
  555. endchar;
  556. %%%%%%%%%%
  557. %% "ddp" %
  558. %%%%%%%%%%
  559. beginchar(59,1/2nhw#, 3nhh#, 0);
  560.          clear;
  561.          penpos1(2nhh,90);
  562.          penpos2(2nhh,90);
  563.          y1r = y2r = h;
  564.          x1r =  0; x2r = w;
  565.          currentpen:= pencircle;
  566.          penstroke z1e--z2e;
  567. labels(1,2);
  568. endchar;
  569. %%%%%%%%%%%%%%%%%%
  570. %% "ganze Pause" %
  571. %%%%%%%%%%%%%%%%%%
  572. beginchar(60, nhw#, 3nhh#, 0);
  573.          clear;
  574.          penpos1(nhh/2,90);
  575.          penpos2(nhh/2,90);
  576.          y1r = y2r = h;
  577.          x1r =  0; x2r = w;
  578.          currentpen:= pencircle;
  579.          penstroke z1e--z2e;
  580. endchar;
  581. %
  582. %%%%%%%%%%%%%%%%%%
  583. %% "halbe Pause" %
  584. %%%%%%%%%%%%%%%%%%
  585. beginchar(61, nhw#, 2.5nhh#, 0);
  586.          clear;
  587.          penpos1(nhh/2,90);
  588.          penpos2(nhh/2,90);
  589.          y1r = y2r = h;
  590.          x1r =  0; x2r = w;
  591.          currentpen:= pencircle;
  592.          penstroke z1e--z2e;
  593. endchar;
  594. %%%%%%%%%%%%%%%%%%%%
  595. %% "viertel Pause" %
  596. %%%%%%%%%%%%%%%%%%%%
  597. beginchar(62, nhw#, 4nhh#, 0);                             % .1
  598.          clear;                                            %         .2
  599.          thin := 5 thinwidth; thick := 1/2 nhh;            %    8..3
  600.          alpha_a = -50; alpha_b = -50;                     %   .4
  601.          penpos1 ( thin, (alpha_a+90));                  %        .5
  602.          penpos5 ( thin, alpha_b);                       %   .6
  603.          penpos2 ( thick, alpha_a   );                  %
  604.          penpos4 ( thick, alpha_b   );                  %        .7
  605.          penpos3 ( thick, 1/2(alpha_a+alpha_b));
  606.          x3r:=9/10[x3,x3r];
  607.          penpos8 ( thick, 1/2(alpha_a+alpha_b));
  608.          x8l:=9/10[x8,x8l];
  609.          penpos6 ( 2/3thick, alpha_b);
  610.          penpos7 ( 1/2thick, 10);
  611.          y1l = h - 2s;
  612.          x1l =  2s;
  613.          z2r =  z1 +(nhh* right) rotated alpha_a;
  614.          z5 =  z4l+(nhh* right) rotated alpha_b;
  615.          z3  = 1/3[z2,z4];
  616.          z8  = 2/3[z2,z4];
  617.          z4  = (w,h) scaled .55;
  618.          y6r = 1.45nhh;
  619.          x6l = x4l;
  620.          x7 = 0.9w; y7= nhh;
  621.          currentpen:= pencircle scaled thin;
  622.          draw z1--z2r; draw z5--z4l;
  623.          penstroke z2e..z3e..z8e..z4e;
  624.          penstroke z5e{nw}..z6e..z7e;
  625. endchar;
  626. %%%%%%%%%%%%%%%%%%%
  627. %% "achtel Pause" %
  628. %%%%%%%%%%%%%%%%%%%
  629. beginchar(63, 2nhh#, 3nhh#, 0)
  630.           clear;
  631.           %punkte f"ur achtelpause, 16. und 32. Pause
  632.           x1=y1= nhh; x2=7/4nhh; y2=11/4nhh;
  633.           x3=x4=1/2nhh; y4=3nhh; y3=10/4nhh;
  634.           currentpen := pencircle scaled 4thinwidth;
  635.           draw z1..z2;
  636.           currentpen := pensquare rotated45 scaled(2*thinwidth);
  637.           draw z2..z3{up+left};
  638.           fill z3..z4..z3..cycle;
  639. endchar;
  640. %%%%%%%%%%%%%%%%%%%%%%%%
  641. %% "sechzehntel Pause" %
  642. %%%%%%%%%%%%%%%%%%%%%%%%
  643. beginchar(64,2nhh#, 3nhh#, 0)
  644.           clear;
  645.           %punkte f"ur achtelpause, 16. und 32. Pause
  646.           x1=y1= nhh; x2=7/4nhh; y2=11/4nhh;
  647.           x3=x4=1/2nhh; y4=3nhh; y3=10/4nhh;
  648. %
  649.           x5=x2; y5=y2;
  650.           y6=0; x6=x5-1/3y5;
  651.           currentpen := pencircle scaled 4thinwidth;
  652.           draw z5..z6;
  653.           currentpen := pensquare rotated45 scaled(2*thinwidth);
  654.           draw z2..z3{up+left};
  655.           draw z2..z3{up+left} shifted(-1/3nhh,-nhh);
  656.           fill z3..z4..z3..cycle;
  657.           fill z3..z4..z3..cycle shifted(-1/3nhh,-nhh);
  658. endchar;
  659. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  660. %% "zweiunddreissigstel Pause" %
  661. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  662. beginchar(65,2nhh#, 4nhh#, 0)
  663.           clear;
  664.           %punkte f"ur achtelpause, 16. und 32. Pause
  665.           x1=y1= nhh; x2=7/4nhh; y2=11/4nhh;
  666.           x3=x4=1/2nhh; y4=3nhh; y3=10/4nhh;
  667. %
  668.           x5=x2+1/6nhh; y5=y2+nhh;
  669.           y6=0; x6=x5-1/3y5;
  670.           currentpen := pencircle scaled 4thinwidth;
  671.           draw z5..z6;
  672.           currentpen := pensquare rotated45 scaled(2*thinwidth);
  673.           draw z2..z3{up+left} shifted( 1/6nhh,nhh);
  674.           draw z2..z3{up+left} shifted(-1/6nhh, 0);
  675.           draw z2..z3{up+left} shifted(-3/6nhh,-nhh);
  676.           fill z3..z4..z3..cycle shifted( 1/6nhh, nhh);
  677.           fill z3..z4..z3..cycle shifted(-1/6nhh, 0);
  678.           fill z3..z4..z3..cycle shifted(-3/6nhh,-nhh);
  679. endchar;
  680. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  681. %% "vierundsechzigstel Pause" %%
  682. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  683. beginchar(66,2nhh#, 5nhh#, 0)
  684.           clear;
  685.           %punkte f"ur achtelpause, 16. und 32. Pause
  686.           x1=y1= nhh; x2=7/4nhh; y2=11/4nhh;
  687.           x3=x4=1/2nhh; y4=3nhh; y3=10/4nhh;
  688. %
  689.           x5=x2+1/3nhh; y5=y2+2nhh;
  690.           y6=0; x6=x5-1/3y5;
  691.           currentpen := pencircle scaled 4thinwidth;
  692.           draw z5..z6;
  693.           currentpen := pensquare rotated45 scaled(2*thinwidth);
  694.           draw z2..z3{up+left} shifted( 1/3nhh, 2nhh);
  695.           draw z2..z3{up+left} shifted(     0,nhh);
  696.           draw z2..z3{up+left} shifted(-1/3nhh, 0);
  697.           draw z2..z3{up+left} shifted(-2/3nhh,-nhh);
  698.           fill z3..z4..z3..cycle shifted( 1/3nhh, 2nhh);
  699.           fill z3..z4..z3..cycle shifted(   0, nhh);
  700.           fill z3..z4..z3..cycle shifted(-1/3nhh,0);
  701.           fill z3..z4..z3..cycle shifted(-2/3nhh,-nhh);
  702. endchar;
  703. %%%%%%%%%%%%%%%%%%%
  704. % ornements       %
  705. %%%%%%%%%%%%%%%%%%%
  706. beginchar (67, 2nhw#, nhh#, 0);
  707.   clear;
  708.   x1=0.2w; y1=h; x6=w-x1; y6=h-y1;
  709.   x2=0; y2=0.5h; x5=w-x2; y5=h-y2;
  710.   x3=0.25w; y3=0; x4=w-x3; y4=h-y3;
  711.   pickup pencircle scaled 4thinwidth;
  712.   penpos1 (5thinwidth,90);
  713.   penpos2 (5thinwidth, 180);
  714.   penpos3 (0.3nhw, -10);
  715.   penpos4 (0.3nhw, -10);
  716.   penpos5 (5thinwidth, 180);
  717.   penpos6 (5thinwidth, 90);
  718.   penstroke (z1e..{down}z2e{down}..{right}z3e{right}..{right}z4e{right}..{down}z5e{down}..z6e)  ;
  719.   pickup pencircle scaled 2s  ;
  720.   drawdot (x1,y1-s)  ;
  721.   drawdot (x6,y6+s)  ;
  722. endchar;
  723. beginchar (68, 2nhw#, nhh#, 0);
  724.   clear;
  725.   x1=0.2w; y1=0; x6=w-x1; y6=h-y1;
  726.   x2=0; y2=0.5h; x5=w-x2; y5=h-y2;
  727.   x3=0.25w; y3=h; x4=w-x3; y4=h-y3;
  728.   pickup pencircle scaled 4thinwidth;
  729.   penpos1 (5thinwidth,-90);
  730.   penpos2 (5thinwidth, -180);
  731.   penpos3 (0.3nhw, 10);
  732.   penpos4 (0.3nhw, 10);
  733.   penpos5 (5thinwidth, -180);
  734.   penpos6 (5thinwidth, -90);
  735.   penstroke (z1e..{up}z2e{up}..{right}z3e{right}..{right}z4e{right}..{up}z5e{up}..z6e);
  736.   pickup pencircle scaled 2s;
  737.   drawdot (x1,y1+s);
  738.   drawdot (x6,y6-s);
  739. endchar;
  740. %%%%%%%%%%%%%%%
  741. % appogiature %
  742. %%%%%%%%%%%%%%%
  743. beginchar(69, apog_fact*nhw#, 3*apog_nhh#, .50*apog_nhh#);
  744.           clear;
  745.           w:=apog_fact*nhw;
  746.           flagshape(1,w, 3*apog_nhh, apog_nhh, 4thinwidth,  w,0);
  747.           clear;
  748.           w:=apog_fact*nhw;
  749.           w:=w+2thinwidth;
  750.           drawnoteb(w, 0.5apog_nhh, 0, 90, 20, w/2, apog_nhh/2);
  751.           clear;
  752.           pickup pencircle scaled 4thinwidth;
  753.           w:=apog_fact*nhw;
  754.           draw (w,0)--(w,h);
  755.           x1=-0.1w; y1=0.6apog_nhh; x2=2w; y2=y1+0.6*(x2-x1);
  756.           draw z1--z2;
  757. %
  758.          w:=apog_fact*nhw;
  759. endchar;
  760. beginchar(70, apog_fact*nhw#, 0.5apog_nhh#, 3*apog_nhh#);
  761.           clear;
  762.           w:=apog_fact*nhw;
  763.           flagshaper(1,w, 3apog_nhh, apog_nhh, 5thinwidth,  (0,-3apog_nhh));
  764.           clear;
  765.           w:=apog_fact*nhw;
  766.           w:=w+2thinwidth;
  767.           drawnoteb(w, 0.5apog_nhh, 0, 90, 20, w/2, apog_nhh/2);
  768.           pickup pencircle scaled 4thinwidth;
  769.           draw (0,0)--(0,-d);
  770.           clear;
  771.           w:=apog_fact*nhw;
  772.           x1=-0.3w; y1=-1.6apog_nhh; x2=1.3w; y2=y1+0.6*(x2-x1);
  773.           draw z1--z2;
  774. %
  775.          w:=apog_fact*nhw;
  776. endchar;
  777. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  778. %                                                             %
  779. %                   NOTENSCHLUESSEL                           %
  780. %                                                             %
  781. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  782. % VIOLINSCHLUESSEL %
  783. %%%%%%%%%%%%%%%%%%%%
  784. def violin(expr width, beginleft, begindown, thick, penthick) =
  785. x10=x3=x2=x8;
  786. y6l=56/15width+y12r;
  787. x11-x4=width;
  788. x5=x4+13/15width;
  789. x2=x4+31/45 width;
  790. x1=x4+7/15width;
  791. x4=beginleft;
  792. x2-x12=4/15 width;
  793. x9+2/5width=x6;
  794. x6-4/15width=x7;
  795. x9=x4+1/5width;
  796. y12r=begindown;
  797. y2r=y4=2y11;
  798. y8=y12r+4/15width;
  799. y2r=y12r+28/15width;
  800. y1=y12r+width;
  801. y3r=y12r+13/15width;
  802. y7=y12r+116/45width;
  803. y5=y12r+16/5width;
  804. y5-y10=y11;
  805. y9=y12r+2/15width;
  806. y13=y8; x13=x8-0.6s;
  807. penpos1(0,180);
  808. penpos2(thick,90);
  809. penpos3(penthick+1/16thick,-90);
  810. penpos4(5/4thick,120);
  811. penpos5(5/6thick,-120);
  812. penpos6(5/3thick,-85);
  813. penpos7(1/2thick,0);
  814. penpos8(penthick,0);
  815. penpos13(penthick,0);
  816. penpos9(5/4thick,170);
  817. penpos10(5/6thick,180);
  818. penpos11(thick,0);
  819. penpos12(penthick,-90);
  820. pickup pencircle scaled 1s;
  821. %
  822. %  penstroke z1e{2left}..z2e..z11e..z3e
  823. %  ..z4e{right+up}..z10e..{up}z5e..z6e;
  824. %  penstroke z6e{down+left}..{down}z7e--z8e;
  825. % fill z8l{2down+right}..z12l..z9l
  826. %  --z9r..z12r..{up}z8r..cycle;
  827. %  pickup pencircle scaled 1s;
  828. %  fill z9l{3/2right+up}..{right+2down}z9r..cycle;
  829. penstroke z1e{2left}..z2e..z11e..z3e
  830. ..z4e{right+up}..z10e..{up}z5e..z6e;
  831. penstroke z6e{down+left}..{down}z7e--z8e
  832. {2down+right}..z12e..{2left+up}z9e;
  833. pickup pencircle scaled 2.5s;
  834. drawdot (x9+0.4s,y9+0.8s);
  835. %
  836. penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
  837. enddef;
  838. %
  839. beginchar(71,3.25nhw#, 6nhh#, 2nhh#);
  840. clear;
  841. violin(15/8nhh,1.75nhh,-1.5nhh,0.4nhh,0.111nhh);
  842. endchar;
  843.  
  844. %%%%%%%%violin-schluessel verkleinert%%%%%%%%
  845. beginchar(72,2.60nhw#, 6nhh#, 2nhh#);
  846. clear;
  847. violin(12/8nhh,1.40nhh,-1.2nhh,0.32nhh,1/10nhh);
  848. endchar;
  849.  
  850. %%%%%%%%%%%%%%%%%%%%%
  851. % BASS--SCHLUESSEL %%
  852. %%%%%%%%%%%%%%%%%%%%%
  853. % clef de fa par D. Taupin %
  854. %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  855. def bass (expr reduction) =
  856.   clear;
  857.   x2=0.80*reduction*nhw; y2=3nhh;
  858.   x1=x2+1.25*reduction*s; y1=y2;
  859.   x3=x2+0.71*reduction*nhw; y3=y2+reduction*nhh;
  860.   x4=x3+0.71*reduction*nhw; y4=y2-0.2*reduction*nhh;
  861.   x6=x2-6*reduction*thinwidth; y6=y2-2.2*reduction*nhh;
  862.   x7=x4+0.50*reduction*nhw; x8=x7;
  863.   y7=y2+0.38*reduction*nhh; y8=y2-0.38*reduction*nhh;
  864. %
  865.   currentpen:=pencircle scaled (4*reduction*thinwidth);
  866.   penpos2(6*reduction*thinwidth,180);
  867.   penpos3(6*reduction*thinwidth, 90);
  868.   penpos4(0.5*reduction*nhh,0);
  869.   penpos6(0.3*reduction*nhh,-30);
  870.   penstroke(z2e{up}..{right}z3e{right}..{down}z4e{down}..{left+0.1down}z6);
  871.   currentpen := pencircle scaled (0.4reduction*nhh);
  872.   pickup pencircle scaled (2*(x2-x1));
  873.          drawdot z1;
  874.   pickup pencircle scaled 1.7s;
  875.   drawdot z7; drawdot z8;
  876. enddef;
  877. %
  878. beginchar(73, 3nhw#, 4nhh#, 0);
  879.   bass(1.0);
  880. endchar;
  881.  
  882. %%%%%%verkleinerter bass-schluessel%%%%%%%%%
  883. beginchar(74, 2.4*nhw#, 4nhh#, 0);
  884.   bass(0.8);
  885. endchar;
  886.  
  887. %%%%%%%%%%%%%%%%%%%
  888. % ALT--SCHLUESSEL %
  889. %%%%%%%%%%%%%%%%%%%
  890. def alt(expr height, beginleft, begindown, thick) =
  891. x1=x7;
  892. x2=x8;
  893. y1-y7=height;
  894. y2-y8=height;
  895. y7=begindown;
  896. x7=beginleft;
  897. x2=x1+1/4height;
  898. x6l=x8l;
  899. y5=y7+1/2height;
  900. y9=y7+1/9height;
  901. x5=x3;
  902. y4=y5+0.120height;
  903. x4-x7=height+3thinwidth;
  904. x4-x5=1/2height+3thinwidth;
  905. y3-y5=2/7height;
  906. y8=y7;
  907. y6=y7;
  908. x9=0.62x5+0.38x4;
  909. x10=x9; y10=y7+height;
  910. x11=0.5x3+0.5x6; y11=y3; penpos11(1/2thick,0);
  911. penpos8(1/4thick,180);
  912. penpos2(1/4thick,180);
  913. penpos1(thick,180);
  914. penpos7(thick,180);
  915. penpos6(thick,0);
  916. penpos5(1/10thick,0);
  917. penpos9(1/3thick,90);
  918. penpos3(1/2thick,0);
  919. penpos4(thick,180);
  920. penpos10(1/3thick,-90);
  921.  
  922. pickup pencircle scaled 1s;
  923. fill z7l--z1l--z1r--z7r--cycle;
  924. fill z8l--z2l--z2r--z8r--cycle;
  925. penstroke z5e..{left+2down}z6e;
  926. penstroke z5e{right+4down}..{right}z9e{right}..{up}z4e{up}..{left}z10e{left}..{left+4down}z11e;
  927.  
  928.  
  929. pickup pencircle scaled 1s;
  930. penstroke
  931.  (counterclockwise(z7e--z1e)reflectedabout(z7,z8));
  932. penstroke
  933. (counterclockwise(z8e--z2e)reflectedabout(z7,z8));
  934. penstroke
  935. (counterclockwise(z5e..{left+2down}z6e)reflectedabout(z7,z8));
  936. penstroke
  937. (counterclockwise (z5e{right+4down}..{right}z9e{right}..{up}z4e{up}..{left}z10e{left}..{left+4down}z11e)
  938. reflectedabout(z7,z8));
  939.  
  940. pickup pencircle scaled 2.5s;
  941. drawdot (x3+0.1nhh, y3);
  942. drawdot (x3+0.1nhh, 2y7-y3);
  943. penlabels(1,2,3,4,5,6,7,8);
  944. enddef;
  945.  
  946. %%%%%%%%%%%Altschl"usseL%%%%%%%%%%%
  947. beginchar(75,3.5nhw#, 4nhh#, 0nhh#);
  948. clear;
  949. alt(2nhh,1.25nhh,2nhh,0.4nhh);
  950. endchar;
  951.  
  952. %%%%%%%%%Verkleinerter Altschluessel%%%%%%%%%
  953. beginchar(76,2.8nhw#, 4nhh#, 0nhh#);
  954. clear;
  955. alt(1.6nhh,1.00nhh,2nhh,0.32nhh);
  956. endchar;
  957.  
  958. %%%%%%%%%Baritonschluessel%%%%%%%%%
  959. beginchar(77,3.5nhw#, 4nhh#, 0nhh#);
  960. clear;
  961. alt(2nhh,1.25nhh,4nhh,2/5nhh);
  962. endchar;
  963.  
  964. %%%%%%%%%Mezzosopranschluessel%%%%%%%%%
  965. beginchar(78,3.5nhw#, 4nhh#, 0nhh#);
  966. clear;
  967. alt(2nhh,1.25nhh,1nhh,2/5nhh);
  968. endchar;
  969.  
  970. %%%%%%%%%Sopranschluessel%%%%%%%%%
  971. beginchar(79,3.5nhw#, 4nhh#, 0nhh#);
  972. clear;
  973. alt(2nhh,1.25nhh,0nhh,2/5nhh);
  974. endchar;
  975. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  976. %                                                             %
  977. %                   SONDERZEICHEN                             %
  978. %                                                             %
  979. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  980.  
  981.  
  982.  
  983.  
  984. def alla_breve (expr trans) =
  985.          thin := 5thinwidth; thick := 1/2 nhh;
  986.          penpos1(thin, 0);
  987.          penpos2(thin, -90);
  988.          penpos3(thick,180);
  989.          penpos4(thin, 90);
  990.          penpos5(thin, 45);
  991.          penpos6(3/4thick,45);
  992.          2x2r = 2x4r = x1 + 2s = w;
  993.          x3r = 0; 2y1 = 3y2 = y4r = h;
  994.          y3r = 2/3h;
  995.          x5 = w -2s;
  996.          y5 = h -2s;
  997.          z6r = z5r;
  998.          penstroke (z1e..z2e..z3e..z4e..z5e) transformed trans;
  999.          currentpen := pencircle scaled (2/3thick);
  1000.          drawdot z6;
  1001. enddef;
  1002.  
  1003.  
  1004. %%%%%%%%%%%%%%%
  1005. % "fermate1" %%
  1006. %%%%%%%%%%%%%%%
  1007. beginchar(80, 2nhw#, 1.25nhh#, 0);
  1008.          clear;
  1009.          penpos2(nhh/3,90);
  1010.          penpos4(nhh/3,90);
  1011.          y2r =1.2h;
  1012.          z1 =  origin; 2x2l = 2x4l = x3 = w; y4l = y3 = 0;
  1013.          penstroke z1..z2e..z3;
  1014.          currentpen:= pencircle scaled (nhh/3);
  1015.          drawdot z4;
  1016. endchar;
  1017. %%%%%%%%%%%%%%%
  1018. % "fermate2" %%
  1019. %%%%%%%%%%%%%%%
  1020. beginchar(81, 2nhw#, 0, 1.25nhh#);
  1021.          clear;
  1022.          penpos2(nhh/3,90);
  1023.          penpos4(nhh/3,90);
  1024.          y2l = -1.2d;
  1025.          z1 =  origin; 2x2l = 2x4 = x3 = w;
  1026.          y4r = y3 = 0;
  1027.          penstroke (z1..z2e..z3);
  1028.          currentpen := pencircle scaled (nhh/3);
  1029.          drawdot z4;
  1030. endchar;
  1031. %%%%%%%%%%%%%%%%
  1032. % "allabreve" %%
  1033. %%%%%%%%%%%%%%%%
  1034. beginchar(82, 2nhh#, 3nhh#, 0);
  1035.          clear;
  1036.          alla_breve(identity);
  1037.          z7 = z4 + 2/16 h *up;
  1038.          z8 = z2 + 2/16 h *down;
  1039.          currentpen := pencircle scaled (thin);
  1040.          draw z7--z8;
  1041. endchar;
  1042. %%%%%%%%
  1043. % "C" %%
  1044. %%%%%%%%
  1045. beginchar(83, 2nhh#, 3nhh#, 0);
  1046.          clear;
  1047.          alla_breve(identity);
  1048. endchar;
  1049. %%%%%%%%%%%%%%%
  1050. % "reverseC" %%
  1051. %%%%%%%%%%%%%%%
  1052. beginchar(84, 2nhh#, 3nhh#, 0);
  1053.          clear;
  1054.          transform T;
  1055.     xxpart T = -yypart T; xypart T = yxpart T; % T is a reflection
  1056.     (w/2,0) transformed T = (w/2,0);  (w/2,1) transformed T = (w/2,1);
  1057.          thin := 5thinwidth; thick := 1/2 nhh;
  1058.          penpos1(thin, 0);
  1059.          penpos2(thin, -90);
  1060.          penpos3(thick,180);
  1061.          penpos4(thin, 90);
  1062.          penpos5(thin, 45);
  1063.          penpos6(3/4thick,45);
  1064.          2x2r = 2x4r = x1 + 2s = w;
  1065.          x3r = 0; 2y1 = 3y2 = y4r = h;
  1066.          y3r = 2/3h;
  1067.          x5 = w -2s;
  1068.          y5 = h -2s;
  1069.          z6r = z5r;
  1070.          penstroke (counterclockwise
  1071.          (z1e..z2e..z3e..z4e..z5e) transformed T);
  1072.          currentpen := pencircle scaled (2/3thick);
  1073.          drawdot (z6 transformed T);
  1074. endchar;
  1075. %%%%%%%%%%%%%%%
  1076. % reprises sym%
  1077. %%%%%%%%%%%%%%%
  1078. beginchar(85, 2nhw#, 3nhh#, 0);
  1079.   clear;
  1080.   x1=0.5w; y1=0.5h;
  1081.   x2=0.5nhh; y2=y1;
  1082.   x3=x1; y3=y1+nhh;
  1083.   x4=2x1-x2; y4=2y1-y2;
  1084.   x5=2x1-x3; y5=2y1-y3;
  1085.   pickup pencircle scaled 4thinwidth;
  1086.   draw (x1,0)--(x1,h);
  1087.   draw (0,y1)--(w,y1);
  1088.   pickup pencircle xscaled 10thinwidth yscaled 4thinwidth;
  1089.   draw z2..z3..z4..z5..cycle;
  1090. endchar;
  1091. beginchar(86, 3nhw#, 3nhw#, 0);
  1092.   clear;
  1093.   x1=0.5w; y1=0.5h;
  1094.   x2=x1; y2=y1+0.4h;
  1095.   x3=2x1-x2; y3=2y1-y2;
  1096.   x4=x1-0.4h; y4=y1;
  1097.   x5=2x1-x4; y5=2y1-y4;
  1098.   x6=x1+0.4w; y6=y1+0.4h;
  1099.   x7=2x1-x6; y7=2y1-y6;
  1100.   pickup pencircle scaled 10thinwidth;
  1101.  drawdot z2; drawdot z3;
  1102.  drawdot z4; drawdot z5;
  1103.   pickup pencircle scaled 4thinwidth;
  1104.   draw z6--z7;
  1105. %
  1106.   x8=x1-0.3w; y8=y1+0.3h;
  1107.   x9=2x1-x8; y9=2y1-y8;
  1108. %
  1109.   draw z8--z9;
  1110. endchar;
  1111. %%%%%%%%%%%%%%%
  1112. %   " pince"  %
  1113. %%%%%%%%%%%%%%%
  1114. def pince =
  1115.          clear;
  1116.          x1=-0.125w; y1=0.25h;
  1117.          x2=1/8w; y2=8/10h;
  1118.          x3=0.5w-x2; y3=h-y2;
  1119.          x4=0.5w+x2; y4=y2;
  1120.          x5=0.5w+x3; y5=y3;
  1121.          x6=w-x1; y6=h-y1;
  1122.          pickup pencircle xscaled 0.40nhh yscaled 0.1nhh rotated 45;
  1123.          draw (z1--z2--z3--z4--z5--z6);
  1124. enddef;
  1125. %
  1126. beginchar(87, 1.2nhw#, 0.8nhh#, 0);
  1127.   pince;
  1128. endchar;
  1129. %
  1130. beginchar(88, 1.8nhw#, 0.8nhh#, 0);
  1131.   w:=2w/3;
  1132.   pince;
  1133.   draw (z4--z5--z6) shifted (0.5w,0);
  1134. endchar;
  1135. %%%%%%%%%%%%%%%
  1136. %  "mordant"  %
  1137. %%%%%%%%%%%%%%%
  1138. beginchar(89, 1.2nhw#, 0.8nhh#, 0);
  1139.   pince;
  1140.   pickup pencircle scaled (4thinwidth);
  1141.   draw (0.5w,-0.4h)--(0.5w,1.4h);
  1142. endchar;
  1143. %%%%%%%%%%%%%%%
  1144. %  arpeggio  %%
  1145. %%%%%%%%%%%%%%%
  1146. def arpegel =
  1147.          clear;
  1148.          y1=0; x1=0.5w;
  1149.          y2=0.3nhh; x2=8/10w;
  1150.          y3=nhh-y2; x3=w-x2;
  1151.          y4=nhh; x4=0.5w;
  1152.          pickup pencircle xscaled 0.40nhh yscaled 0.1nhh rotated 45;
  1153.          draw (z1..z2..z3..z4);
  1154. enddef;
  1155. %
  1156. beginchar(90, 0.4nhw#, nhh#, 0);
  1157.   arpegel;
  1158. endchar;
  1159. for jj=1 upto 9:
  1160.   beginchar(90+jj, 0.4nhw#, (1+jj)*nhh#, 0);
  1161.   arpegel;
  1162.   for kk=1 upto jj:
  1163.          draw (z1..z2..z3..z4) shifted (0,kk*nhh);
  1164.   endfor;
  1165. endchar;
  1166. endfor;
  1167. %%%%%%%%%%%%%%%
  1168. %  "trille"  %%
  1169. %%%%%%%%%%%%%%%
  1170. def arp_elem =
  1171.          clear;
  1172.          x1=0; y1=0.5h;
  1173.          x2=1/3nhw; y2=8/10h;
  1174.          x3=nhw-x2; y3=h-y2;
  1175.          x4=nhw; y4=0.5h;
  1176.          pickup pencircle xscaled 0.33nhh yscaled 0.1nhh rotated 45;
  1177.          draw (z1..z2..z3..z4);
  1178. enddef;
  1179. %
  1180. beginchar(100, nhw#, 0.45nhh#, 0);
  1181.   arp_elem;
  1182. endchar;
  1183. %
  1184. for jj=1 upto 9:
  1185.   beginchar(100+jj, (jj+1)*nhw#, 0.45nhh#, 0);
  1186.     arp_elem;
  1187.     for kk=1 upto jj:
  1188.          draw (z1..z2..z3..z4) shifted (kk*nhw,0);
  1189.     endfor;
  1190.   endchar;
  1191. endfor;
  1192. %%%%%%%%%%%%%%%%%%%%%%%
  1193. %% "8flag nach unten" %
  1194. %%%%%%%%%%%%%%%%%%%%%%%
  1195. beginchar(110, 0, 3apog_nhh#, 0);
  1196.      clear;
  1197.      w:=0.8*apog_fact*nhw;
  1198.      flagshape(1,w, h, apog_nhh, 5thinwidth, 0, 0);
  1199.      w:=0;
  1200. endchar;
  1201.  
  1202. %%%%%%%%%%%%%%%%%%%%%%%%
  1203. %% "16flag nach unten" %
  1204. %%%%%%%%%%%%%%%%%%%%%%%%
  1205.  
  1206. beginchar(111, 0, 3.25apog_nhh#, 0);
  1207.      clear;
  1208.      w:=0.8*apog_fact*nhw;
  1209.      flagshape(1, w, 2.5apog_nhh, 2/3apog_nhh, 5thinwidth, 0, 0);
  1210.      flagshape(5,.95 w, 2.25 apog_nhh, 2/3apog_nhh, 5thinwidth, 0, apog_nhh);
  1211.      w:=0;
  1212. endchar;
  1213.  
  1214. %%%%%%%%%%%%%%%%%%%%%%%%
  1215. %% "32flag nach unten" %
  1216. %%%%%%%%%%%%%%%%%%%%%%%%
  1217.  
  1218. beginchar(112, 0, 3.75apog_nhh#, 0);
  1219.      clear;
  1220.      w:=0.8*apog_fact*nhw;
  1221.      flagshape(1, w, 2.5apog_nhh, 2/3apog_nhh, 5thinwidth, 0, 0);
  1222.      flagshape(5, .95w, 2.25 apog_nhh, 2/3apog_nhh, 5thinwidth, 0, apog_nhh);
  1223.      flagshape(9, .9w, 2  apog_nhh, 2/3apog_nhh, 5thinwidth, 0, 1.75apog_nhh);
  1224.      w:=0;
  1225. endchar;
  1226.  
  1227. %%%%%%%%%%%%%%%%%%%%%%%%
  1228. %% "64flag nach unten" %
  1229. %%%%%%%%%%%%%%%%%%%%%%%%
  1230.  
  1231. beginchar(113, 0, 4.25apog_nhh#, 0);
  1232.      clear;
  1233.      w:=0.8*apog_fact*nhw;
  1234.      flagshape(1, w, 2.5apog_nhh, 2/3apog_nhh, 5thinwidth, 0, 0);
  1235.      flagshape(5,.95 w, 2.25 apog_nhh, 2/3apog_nhh, 5thinwidth, 0, apog_nhh);
  1236.      flagshape(9,.9w, 2 apog_nhh, 2/3apog_nhh, 5thinwidth, 0, 1.75apog_nhh);
  1237.      flagshape(13,0.85w, 2apog_nhh, 2/3apog_nhh, 5thinwidth, 0, 2.25apog_nhh);
  1238.      w:=0;
  1239. endchar;
  1240.  
  1241. %%%%%%%%%%%%%%%%%%%%%%%%%
  1242. %% "128flag nach unten" %
  1243. %%%%%%%%%%%%%%%%%%%%%%%%%
  1244.  
  1245. beginchar(114, 0, 4.5apog_nhh#, 0);
  1246.      clear;
  1247.      w:=0.8*apog_fact*nhw;
  1248.      flagshape(1, w, 2.5apog_nhh, 2/3apog_nhh, 5thinwidth, 0, 0);
  1249.      flagshape(5, w, 2.25apog_nhh, 2/3apog_nhh, 5thinwidth, 0, apog_nhh);
  1250.      flagshape(9, w, 2 apog_nhh, 2/3apog_nhh, 5thinwidth, 0, 1.75apog_nhh);
  1251.      flagshape(13,0.9 w, 2apog_nhh, 2/3apog_nhh, 5thinwidth, 0, 2.25apog_nhh);
  1252.      flagshape(17,0.9 w, 1.5apog_nhh, 1/3apog_nhh, 5thinwidth, 0, 3apog_nhh);
  1253.      w:=0;
  1254. endchar;
  1255.  
  1256. %%%%%%%%%%%%%%%%%%%%%%
  1257. %% "8flag nach oben" %
  1258. %%%%%%%%%%%%%%%%%%%%%%
  1259.  
  1260. beginchar(115, 0, 3apog_nhh#, 0);
  1261.      clear;
  1262.      w:=0.8*apog_fact*nhw;
  1263.      flagshaper(1,w, h, apog_nhh, 5thinwidth, origin);
  1264.      penlabels(1,2,3,4);
  1265.      w:=0;
  1266. endchar;
  1267.  
  1268. %%%%%%%%%%%%%%%%%%%%%%%
  1269. %% "16flag nach oben" %
  1270. %%%%%%%%%%%%%%%%%%%%%%%
  1271.  
  1272. beginchar(116, 0, 3.25apog_nhh#, 0);
  1273.      clear;
  1274.      w:=0.8*apog_fact*nhw;
  1275.      flagshaper(1, w, 2.5apog_nhh, 2/3apog_nhh, 5thinwidth, (0,0.75apog_nhh));
  1276.      flagshaper(5, w, 2.25 apog_nhh, 2/3apog_nhh, 5thinwidth,(0,-0.25apog_nhh));
  1277.      penlabels(1,2,3,4,5,6,7,8);
  1278.      w:=0;
  1279. endchar;
  1280.  
  1281. %%%%%%%%%%%%%%%%%%%%%%%
  1282. %% "32flag nach oben" %
  1283. %%%%%%%%%%%%%%%%%%%%%%%
  1284.  
  1285. beginchar(117, 0, 3.75apog_nhh#, 0);
  1286.      clear;
  1287.      w:=0.8*apog_fact*nhw;
  1288.      flagshaper(1, w, 2.5apog_nhh, 2/3apog_nhh, 5thinwidth, (0,1.5apog_nhh));
  1289.      flagshaper(5, w, 2.5apog_nhh, 2/3apog_nhh, 5thinwidth, (0,0.75apog_nhh));
  1290.      flagshaper(9, .95w, 2.25 apog_nhh, 2/3apog_nhh, 5thinwidth, origin);
  1291.      penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
  1292.      w := 0;
  1293. endchar;
  1294.  
  1295. %%%%%%%%%%%%%%%%%%%%%%%
  1296. %% "64flag nach oben" %
  1297. %%%%%%%%%%%%%%%%%%%%%%%
  1298.  
  1299. beginchar(118, 0, 4.25apog_nhh#, 0);
  1300.      clear;
  1301.      w:=0.8*apog_fact*nhw;
  1302.      flagshaper(1, w, 2.5apog_nhh, 2/3apog_nhh, 5thinwidth, (0,1.75apog_nhh));
  1303.      flagshaper(5, w, 2.25 apog_nhh, 2/3apog_nhh, 5thinwidth, (0,1apog_nhh));
  1304.      flagshaper(9,w, 2 apog_nhh, 2/3apog_nhh, 5thinwidth, (0,0.34apog_nhh));
  1305.      flagshaper(13,0.9w, 2apog_nhh, 2/3apog_nhh, 5thinwidth, (0,-0.32apog_nhh));
  1306.      penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
  1307.      w := 0;
  1308. endchar;
  1309.  
  1310. %%%%%%%%%%%%%%%%%%%%%%%%
  1311. %% "128flag nach oben" %
  1312. %%%%%%%%%%%%%%%%%%%%%%%%
  1313.  
  1314. beginchar(119, 0, 4.5apog_nhh#, 0);
  1315.      clear;
  1316.      w:=0.8*apog_fact*nhw;
  1317.      flagshaper(1, w, 2.25apog_nhh, 2/3apog_nhh, 5thinwidth, (0,2.5apog_nhh));
  1318.      flagshaper(5, w, 2.25apog_nhh, 2/3apog_nhh, 5thinwidth, (0,1.75apog_nhh));
  1319.      flagshaper(9, w, 2 apog_nhh, 2/3apog_nhh, 5thinwidth, (0,1apog_nhh));
  1320.      flagshaper(13,0.9 w, 2apog_nhh, 2/3apog_nhh, 5thinwidth, (0,0.5apog_nhh));
  1321.      flagshaper(17,0.9 w, 2apog_nhh, 1/3apog_nhh, 5thinwidth, (0,0apog_nhh));
  1322.      w := 0;
  1323. endchar;
  1324. %%%%%%%%%%%%%%%%
  1325. % kleine versetzungen
  1326. %%%%%%%%%%%%%%%%
  1327. beginchar(120, apog_fact*nhw#, 2apog_fact*nhh#, 2apog_fact*nhh#);
  1328.  flat (apog_fact);
  1329. endchar;
  1330. beginchar(121,2*apog_fact*nhw#, 2*apog_fact*nhh#, 2*apog_fact*nhh#);
  1331.          flat (apog_fact);
  1332.          draw (z1--z3) shifted ((w/2 - 1.5s),0);
  1333.          penstroke (z2e..z4e...z3e{3left+2down})shifted ((w/2 -1.5s),0);
  1334. endchar;
  1335. beginchar(122, 0.8apog_fact*nhw#, 1.5apog_fact*nhh#, 1.5apog_fact*nhh#);
  1336.   sharp(apog_fact);
  1337. endchar;
  1338. beginchar(123, apog_fact*nhw#, .5nhw#, .5nhw#);
  1339.          clear;
  1340.          z1 = (0.150w, h-0.150w); z2 = (w-0.150w, h-0.150w);
  1341.          z3 = (0.150w,-h+0.150w); z4 = (w-0.150w,-h+0.150w);
  1342.          pwidth:=0.2*apog_fact*nhh;
  1343.          currentpen:= pencircle scaled pwidth;
  1344.          draw z1--z4; draw z3--z2;
  1345.          currentpen:= pensquare scaled .30w;
  1346.          drawdot z1; drawdot z2; drawdot z3; drawdot z4;
  1347. endchar;
  1348. beginchar(124, 0.8apog_fact*nhw#, 1.5apog_fact*nhh#, 1.5apog_fact*nhh#);
  1349.   natural;
  1350. endchar;
  1351. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1352. %% volle Note mit | -->  |O|%
  1353. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1354. beginchar(125,1.5nhh#, .5nhh#, .5nhh#);
  1355.           drawnoteb(w, h, 0, 85, 0, nhh/3, 3*thinwidth);
  1356.           pickup pensquare scaled 0.2w;
  1357.           draw (-0.05w,-0.4nhh)--(-0.05w,0.4nhh);
  1358.           draw (1.05w,-0.4nhh)--(1.05w,0.4nhh);
  1359. endchar;
  1360.  
  1361.